/**
 * @author : dormi330
 * @date : 2020-03-05
 * description : 优惠必须满足的接口
 */

package org.dormi.learn.promotion.model;

public interface Promotion extends Comparable<Promotion> {

    Long getId();

    String getName();

    int getPriority();

    @Override
    default int compareTo(Promotion other) {
        return getPriority() - other.getPriority();
    }

}
